import request from '@/utils/request';

// 修改密码
export function changePassword(data: { oldPassword: string; newPassword: string }) {
  return request({
    url: '/api/user/password',
    method: 'put',
    data
  });
}

// 更新通知设置
export function updateNotificationSettings(data: { 
  emailNotification: boolean; 
  notificationTypes: string[] 
}) {
  return request({
    url: '/api/user/notifications/settings',
    method: 'put',
    data
  });
}

// 获取安全信息
export function getSecurityInfo() {
  return request({
    url: '/api/user/security',
    method: 'get'
  });
}

// 注销账号
export function deleteAccount(data: { password: string }) {
  return request({
    url: '/api/user/account',
    method: 'delete',
    data
  });
}

// 获取通知设置
export function getNotificationSettings() {
  return request({
    url: '/api/user/notifications/settings',
    method: 'get'
  });
} 